<?php
	$listmenu = $this->Menu_model->getBackEndMenu($this->lang->lang(),NULL); 
	$lang = $this->Language_model->getAll();
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
	<title>Real World Admin - Dashboard Page</title>
    
    <!-- JQuery UI CSS Framework -->
    <link rel="stylesheet" type="text/css" href="<?php echo base_url() ?>resources/css/ui-lightness/jquery-ui-1.8.4.custom.css"  />
    <!-- End JQuery UI CSS Framework -->
	
    <!-- Styles specific for current page -->
    <link rel="stylesheet" type="text/css" href="<?php echo base_url() ?>resources/js/markitup/skins/markitup/style.css" />
	<link rel="stylesheet" type="text/css" href="<?php echo base_url() ?>resources/js/markitup/sets/html/style.css" />
    <link rel="stylesheet" type="text/css" href="<?php echo base_url() ?>resources/js/jqplot/jquery.jqplot.css" />
    
     <!-- END Specific Styles -->
    
    <!-- General Styles common for all pages -->
    <link rel="stylesheet" type="text/css" href="<?php echo base_url() ?>resources/css/globals.css" />
    <link rel="stylesheet" type="text/css" href="<?php echo base_url() ?>resources/css/commons.css" />
    <link rel="stylesheet" type="text/css" href="<?php echo base_url() ?>resources/css/plugins.css" />
    <!-- END General Styles -->
    
    <!-- Current Theme styles. These are changed via theme switcher -->	
    <link rel="stylesheet" type="text/css" href="<?php echo base_url() ?>resources/themes/sleek-wood/css/globals.css" />
	<link rel="stylesheet" type="text/css" href="<?php echo base_url() ?>resources/themes/sleek-wood/css/commons.css" />
	<link rel="stylesheet" type="text/css" href="<?php echo base_url() ?>resources/themes/sleek-wood/css/plugins.css" /> 
    <!-- END Current Theme styles -->
    
    
    
</head>

<body>	
	

	<!-- Container -->
	<div id="container">
    	<!-- Header -->
        <div id="header">
    		<div id="header-top">
            	<div id="top-block-left">
                	<p><?php echo lang('template.user')?>: <?php echo $this->session->userdata('admin_name')?> [&nbsp;<?php echo lang('template.permission')?>&nbsp;]</p>
                </div>
                <ul id="top-toolbox">
                	<li><a href="#" id="settings-link" onclick="test()"><?php echo lang('template.setting')?></a></li>
                    <li><a href="#" id="profile-link"><?php echo lang('template.edit')?></a></li>
                    <li><a href="login/logout" id="logout-link"><?php echo lang('template.logout')?></a></li>
                </ul>
                <div class="clear"></div>
            </div>
            <div id="header-middle">
           		<a href="dashboard.html" id="logo">Real World Admin</a>
            </div>
            <!-- Top Menu -->
            <div id="menu">
            	<ul class="topnav">
            		<?php foreach ($listmenu as $m):?>
            		<li>
						<?php echo anchor($m['link'],$m['menu_name'])?>
            			<?php
            				$submenu = $this->Menu_model->getBackEndMenu($this->lang->lang(),$m['id']);
            			?>
            			<?php if(sizeof($submenu) > 0):?>
            			<ul class="subnav">
            				<?php foreach ($submenu as $sub):?>
            					<li>
            						<?php echo anchor($sub['link'],$sub['menu_name'])?>
            					</li>
            				<?php endforeach;?>
                            
                        </ul>
            			<?php endif;?>
                    	
                    </li>
            		<?php endforeach;?>
                    <li class="right"><a href="#" id="menu-theme"><?php echo lang('template.lang')?></a>
                        <ul class="subnav">
                        	<?php foreach ($lang as $l):?>
                        	<li>
                        		<?php echo anchor($this->lang->switch_uri($l['code']),$l['name'])?>
                        	</li>
                        	<?php endforeach;?>
                        </ul>
					</li>
                </ul>
		  	</div>
            <!-- END Menu -->
        </div>
        <!-- END Header -->
        <div class="clear"></div>
         
        <!-- Content -->
 		<div id="content">
        	<?php print $content?>
        </div>
   		<!-- END Content -->
 	</div>
  	<!-- END Container -->
 		
  	<!-- Footer Container -->
 	<div id="footer-container">
        <div id="footer">
            <div id="footer-logo">
    			<p id="copyright">Copyright &copy; 2012 By <a href="http://ctvitech.com" style="color: white;text-decoration: none;font-family: serif;">CTV IT TEAM</a>.</p>
            </div>
            <!-- Footer Menu -->
            <ul class="menu">
             	<?php foreach ($listmenu as $m):?>
            		<li>
						<?php echo anchor($m['link'],$m['menu_name'])?>
                    </li>
            		<?php endforeach;?>
            		
            </ul>
            <!-- END Footer Menu -->
           <div class="clear"></div>
        </div>
    </div>
    <!-- END Footer Container -->
 		
  	<!--[if lte IE 6]><script src="<?php echo base_url() ?>resources/js/ie6/warning.js"></script><script>window.onload=function(){e("js/ie6/")}</script><![endif]-->
    <script type="text/javascript" src="<?php echo base_url() ?>resources/js/jquery.js"></script>
    <script type="text/javascript" src="<?php echo base_url() ?>resources/js/jquery-ui-1.8.4.custom.min.js"></script>
    
	 <!-- Custom Written scripts file -->
	<script type="text/javascript" src="<?php echo base_url() ?>resources/js/custom.js"></script>
	<script type="text/javascript" src="<?php echo base_url() ?>resources/js/default.js"></script>
	<script type="text/javascript" src="<?php echo base_url() ?>resources/js/jquery.tablesorter.min.js"></script>
    
	<script type="text/javascript" src="<?php echo base_url() ?>resources/js/markitup/jquery.markitup.js"></script>
    <script type="text/javascript" src="<?php echo base_url() ?>resources/js/markitup/sets/html/set.js"></script>
	
	<!--[if IE]><script language="javascript" type="text/javascript" src="<?php echo base_url() ?>resources/js/jqplot/excanvas.js"></script><![endif]-->
    <script type="text/javascript" src="<?php echo base_url() ?>resources/js/jqplot/jquery.jqplot.js"></script>
   	<script type="text/javascript" src="<?php echo base_url() ?>resources/js/jqplot/plugins/jqplot.categoryAxisRenderer.js"></script>
	<script type="text/javascript" src="<?php echo base_url() ?>resources/js/jqplot/plugins/jqplot.barRenderer.js"></script>
   
    <script type="text/javascript">
		$(document).ready(function(){
			$("#pagetext").markItUp(mySettings);
		
			line1 = [[4, 1], [2, 2], [9, 3], [16, 4]];
    		line2 = [[3, 1], [7, 2], [6.25, 3], [3.125, 4]];
    		plot2 = $.jqplot('chart2', [line1, line2], {
        	stackSeries: true,
        	legend: {show: true,location: 'se'},
        	title: 'Sales Report',
        	seriesDefaults: {
            	renderer: $.jqplot.BarRenderer,
            	rendererOptions: {
                	barDirection: 'horizontal',
                	barPadding: 6,
                	barMargin: 40
            	}
        	},
        	series: [{
            	label: '1st Qtr'
        	},
        	{
            	label: '2nd Qtr'
        	}],
        	axes: {
            	yaxis: {
                	renderer: $.jqplot.CategoryAxisRenderer,
                	ticks: ['Q1', 'Q2', 'Q3', 'Q4']
            	},
            	xaxis: {min: 0, max: 20, numberTicks:5}
        	}
    	});

		});

		 
		
	</script>

	<script type="text/javascript" language="javascript">
		setInterval("updateAdminLogged('<?php echo base_url()?>')", 10000);
	</script>
	
	
	
</body>
</html>

